#ifndef CRENDEREROGL_H_INCLUDED
#define CRENDEREROGL_H_INCLUDED

#include "GLOBAL.h"
#include "IRenderer.h"

#include "GL/glew.h"
#include <SDL/SDL.h>


/// OpenGL Realization of The Renderer
class CRendererOGL : public IRenderer {
private:
	SDL_Surface* 	m_Surf_Display;	///< Our Dirty Region
	IRenderTarget* m_pBackbuffer;		///< Our Backbuffer Representation

public:
	int 				Initialize( int w, int h, int b, bool fs );
	IRenderTarget* GetBackBuffer( ) const { return m_pBackbuffer; }
	void				Present( );

	 CRendererOGL( );
	~CRendererOGL( );
};

#ifdef TZM_BUILD_DEBUGMODE
   #define TZM_OGL_GETERROR( activity ) { \
      GLenum errCode; \
      if( (errCode = glGetError()) != GL_NO_ERROR ) \
         cout<<endl<<"OPENGL ERROR: "<<gluErrorString(errCode)<<", while "<<activity; }
#else
   #define TZM_OGL_GETERROR( activity ) ;
#endif



#endif // CRENDEREROGL_H_INCLUDED
